package cn.tedu.autoshow.website.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class BannerAddNewParam implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "图片路径不能为空，上传失败")
    @ApiModelProperty(value = "图片路径", required = true, example = "/2023/05/13/xxx.jpg")
    private String url;

    @ApiModelProperty(value = "鼠标悬停显示文本", example = "这是一张XX图片")
    private String title;

    @ApiModelProperty(value = "图片丢失显示文本", example = "这是一张XX图片")
    private String alt;

    @Range(max = 99, message = "排序序号值不合法，合法范围0~99")
    @ApiModelProperty(value = "排序序号，范围0~255", example = "99")
    private Integer sort;

    @NotNull(message = "轮播图类别不能为空")
    @ApiModelProperty(value = "轮播图类别（1=往期回顾，2=名模佳丽）", required = true, example = "1")
    private Integer typeId;

    @NotNull(message = "是否显示不能为空")
    @Range(max = 1, message = "是否显示值不合法")
    @ApiModelProperty(value = "是否显示（1=显示，0=不显示）", required = true, example = "1")
    private Integer isDisplay;

}










